import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';
//单条查询
export const queryBizQuestionSendRecord = (params) => {
  params.head.transCode = 'queryBizQuestionSendRecord';
  return request({
    url: '/biz/question/bizQuestionSendRecord/queryBizQuestionSendRecord',
    method: 'post',
    data: params
  })
}
//多条列表查询，支持条件查询
export const queryBizQuestionSendRecordListPage = (params) => {
  params.head.transCode = 'queryBizQuestionSendRecordListPage';
  return request({
    url: '/biz/question/bizQuestionSendRecord/queryBizQuestionSendRecordListPage',
    method: 'post',
    data: params
  })
}
//新增单条记录
export const saveBizQuestionSendRecord = (params) => {
  params.head.transCode = 'saveBizQuestionSendRecord';
  return request({
    url: '/biz/question/bizQuestionSendRecord/saveBizQuestionSendRecord',
    method: 'post',
    data: params
  })
}
//新增多条记录
export const saveBizQuestionSendRecordList = (params) => {
  params.head.transCode = 'saveBizQuestionSendRecordList';
  return request({
    url: '/biz/question/bizQuestionSendRecord/saveBizQuestionSendRecordList',
    method: 'post',
    data: params
  })
}
//新增或修改单条记录
export const saveOrUpdateBizQuestionSendRecord = (params) => {
  params.head.transCode = 'saveOrUpdateBizQuestionSendRecord';
  return request({
    url: '/biz/question/bizQuestionSendRecord/saveOrUpdateBizQuestionSendRecord',
    method: 'post',
    data: params
  })
}


//新增或修改单条记录
export const saveOrUpdateBizQuestionSendRecordList = (params) => {
  params.head.transCode = 'saveOrUpdateBizQuestionSendRecordList';
  return request({
    url: '/biz/question/bizQuestionSendRecord/saveOrUpdateBizQuestionSendRecordList',
    method: 'post',
    data: params
  })
}

//修改单条记录
export const updateBizQuestionSendRecord = (params) => {
  params.head.transCode = 'updateBizQuestionSendRecord';
  return request({
    url: '/biz/question/bizQuestionSendRecord/updateBizQuestionSendRecord',
    method: 'post',
    data: params
  })
}

//删除单条记录
export const deleteBizQuestionSendRecord = (params) => {
  params.head.transCode = 'deleteBizQuestionSendRecord';
  return request({
    url: '/biz/question/bizQuestionSendRecord/deleteBizQuestionSendRecord',
    method: 'post',
    data: params
  })
}

//删除多条记录
export const deleteBizQuestionSendRecordList = (params) => {
  params.head.transCode = 'deleteBizQuestionSendRecordList';
  return request({
    url: '/biz/question/bizQuestionSendRecord/deleteBizQuestionSendRecordList',
    method: 'post',
    data: params
  })
}
//导出excel
export const exportBizQuestionSendRecordExcel = (params) => {
  downloadExcel({
    url: '/biz/question/bizQuestionSendRecord/excelDownload/exportBizQuestionSendRecordExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
